#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
#include <string.h>

class Solution {
public:
    int massage(vector<int>& nums) {
        if (nums.size() == 0) return 0;
        int len = nums.size();
        vector<int> f(len + 1);
        vector<int> g(len + 1);
        f[0] = nums[0];
        g[0] = 0;
        for (int i = 1; i < len; i++) {
            f[i] = g[i - 1] + nums[i];
            g[i] = max(f[i - 1], g[i - 1]);
        }
        int c = max(f[len - 1], g[len - 1]);
        return c;
    }
};


//class Solution {
//public:
//	int calculateMinimumHP(vector<vector<int>>& dungeon) {
//		int n = dungeon.size(), m = dungeon[0].size();
//		vector<vector<int>> dp(n + 1, vector<int>(m + 1, INT_MAX));
//		dp[n][m - 1] = dp[n - 1][m] = 1;
//		for (int i = n - 1; i >= 0; i--)
//			for (int j = m - 1; j >= 0; j--) {
//				dp[i][j] = min(dp[i + 1][j], dp[i][j + 1]) - dungeon[i][j];
//				dp[i][j] = max(dp[i][j], 1);
//			}
//		return dp[0][0];
//	}
//};


int main() {
	char str[81];
	int i = 0;
	while ((str[i] = getchar()) != '\n')
		i++;
	str[i] = '\0';
	int ans = 0;

	for (i = 0; i < strlen(str); i++) {
		if (str[i] >= '0' && str[i] <= '9') {
			ans = ans * 10 + str[i] - '0';
		}
	}

	printf("%d\n", ans);
	return 0;
}